/*
 * ZonalTest.java
 *
 * Created on March 21, 2005, 10:39 AM
 */

package edu.temple.GUS.MMA.Functions;

/**
 *
 * @author  rkhanna
 */
import java.util.Hashtable;
import edu.temple.GUS.MMA.DataTypes.*;
import edu.temple.GUS.MMA.Functions.*;
import edu.temple.GUS.MMA.Functions.ZonalAdd;
import edu.temple.GUS.MMA.io.*;
import edu.temple.GUS.MMA.Neighborhoods.*;
import edu.temple.GUS.MMA.Neighborhoods.TLag;
import edu.temple.GUS.MMA.Neighborhoods.XYTLag;
import edu.temple.GUS.MMA.Neighborhoods.XYZLag;
import edu.temple.GUS.MMA.Neighborhoods.XYZTLag;
import edu.temple.GUS.MMA.Neighborhoods.XYZTLagList;
import java.util.*;

public class ZonalTest {
    
    /** Creates a new instance of ZonalTest */
    public ZonalTest() 
    {
    }
    
    
    public static void main(String[] args) throws Exception
    {
    //try
    //{
        MMATimeSeries tsobj = BSQReader.readTimeSeries("V:\\TestData\\MMA_input\\timeseries_input1\\", "timeseries.hdr");
        //MMATimeSeries tsobj1 = BSQReader.readTimeSeries("V:\\TestData\\MMA_input\\timeseries_input2\\", "timeseries.hdr");        
        MMATimeCube tcube = BSQReader.readTimeCube("V:\\TestData\\MMA_input\\timecube_input\\", "timecube.hdr");                
        ZonalMaximum zonalobj = new ZonalMaximum();    
        Hashtable ht = zonalobj.execute(tsobj, tcube);             
        ZonalTableWriter.writeTable(ht, "V:\\testresult\\Zonal\\add\\result.txt");
        
/*        Enumeration e = ht.keys();
            while (e.hasMoreElements())
            {
                Float ff = (Float)e.nextElement();                
                float outputkey = ff.floatValue();
                Vector temp_cl = (Vector)ht.get(ff);
                //float outputvalue = temp_cl.floatValue();               
                //System.out.println(outputkey + ":::" + outputvalue);
            }          
*/
    // }catch(Exception e) {System.out.println("Exception called from main method"+ e);}        
    }	        
}
